package com.yinghuo.risk.frigate.web.component;

import com.yinghuo.risk.frigate.core.handler.TokenIdHandler;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * com.yinghuo.risk.frigate.web.component
 *
 * @author 白雨浓
 * date: 2018/10/18 11:58
 * content:
 */
@Component
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TokenIdHandlerComponent implements TokenIdHandler {

    private final HttpServletRequest request;

    @Override
    public String getTokenId() {
        return request.getHeader("test");
    }
}
